﻿@page "/"

<h1>UEditor Blazor</h1>

UEditor of blazor.

<!--似乎Width需要使用px等单位，或者%；Height因为js检查了int以及增加了px所以只需要数字即可-->
<UEditor.Editor @ref="editor" @bind-Value="value" @bind-Html="html" Height="500" MinHeight="500" Width="700px" also-Width="100%" />

<br />


Content:@value

<br />

@((MarkupString)html)

<br />
<button @onclick="()=>{ value = DateTime.Now.ToString(); }">Change Value</button>
<button @onclick="Click">Get Value</button>
@code{
    string value = "Hello Blazor!";
    string html;

    Editor editor;

    async Task Click()
    {
        var value = await editor.GetValueAsync();
        Console.WriteLine(value);
    }

    void Rendererd()
    {
        Console.WriteLine("rendererd!");
    }
}